<%content_for :title do %><%= @event.title %> - <%= !@event.author.nil? ? @event.author.name : "" %><% end %>
<%content_for :description do %><%=t("site.meta_desc.event")+@event.title + ". " + (@event.description ? @event.description : "")%><% end %>
<%content_for :keywords do %><%= @event.tag_list %><% end %>
<%content_for :alternate_urls do%><%=raw alternate_urls(polymorphic_url(@event), @event)%><%end%>
<%content_for :canonical do%><%=polymorphic_url(@event, :locale => params[:locale])%><%end%>

<section id="event" class="layout_show">
  
  <div class="event">
    <!--recomended-->
    <%= render :partial => 'recommender/sidebar', :locals  => {:resources => RecommenderSystem.resource_suggestions({:user => current_subject, :lo => @event, :n=>12, :models => [Event]})} %>

    <div class="eve-show">
      <!--visor-->
      <div class="viewerContainer">
        <div class="elementsBox">
          <!-- Streming from 10 minutes before until 2 hours later -->
          <% if @event.streaming && ((Time.now <=> (@event.start_at - (60 * 30))) > -1) && ((Time.now <=> (@event.end_at + (60 * 60 * 2))) < 1) %>
            <div class="iframe_show_wrapper">
              <iframe src="<%=event_path(@event, :format => :full)%>" width="800px" height="600px" style="border:0" iframeborder="0" frameborder="0" iframeElement.frameBorder = 0; webkitAllowFullScreen="true" allowfullscreen="true" mozallowfullscreen="true" sandbox="allow-scripts allow-same-origin"></iframe>
            </div>
        <% else %>
            <div class="icon-box" id="event-<%=@event.id%>">
              <% if @event.poster.new_record? %>
                <%= image_tag('items/rec2.jpg', :class=> "event-img") %>
              <% else %>
                <%= image_tag(@event.poster.file) %>
                <%= content_for :javascript do %>
                  $("#event-<%=@event.id%>").addClass("high")
                <%end%>
              <% end %>         
            </div>  
         <% end %>
        </div>
      </div>

      <div class="description-activity">
        <div class="box_description">
          <!--tool-->
          <div class="excursion_tool">
            <%= render :partial => 'events/event-tool-tab', :locals => { :document => @event } %>
          </div>     
        
          <!--activity-->
          <div class="activity-box">
            <%= render :partial => 'common_documents/activity', :locals => { :document => @event } %>
          </div>
        </div>
      </div>
    </div>
  </div>

</section>

